<?php
class UserCP extends Module
{
	function UserCP($row)
	{
		Module::Module($row);			
		
		if(User::is_login()&&User::is_root())
		{
			switch( Url::get('cmd') )
			{
				case 'user_account':

                case 'edit':
                    require_once 'forms/EditUser.php';
                    $this->add_form(new EditUserForm);
                    break;

				case 'change_pass':							
					require_once 'forms/ChangePassword.php';
					$this->add_form(new ChangePasswordForm);
					break;
					
				default:
					require_once 'forms/EditUser.php';
					$this->add_form(new EditUserForm);
					break;
			}
		}
		else
		{
			Url::access_denied();
		}
	}				
}
?>
